package main

import "fmt"

func main() {
	arr := []int{1, 11, 111, 2, 22, 222, 3, 33, 333}
	// 找最大值和最小值
	max, min := arr[0], arr[0]
	for _, v := range arr {
		if v > max {
			max = v
		}
		if v < min {
			min = v
		}
	}
	fmt.Println("最大值：", max)
	fmt.Println("最小值：", min)
}
